

<%@page import="java.util.List"%>
<%@page import="database.RequestDAO"%>
<%@page import="model.Staff"%>
<!--<style type="text/css">
    body{
    background-color:#000;
    color:#0F0;
    font-family:"Courier New";
    font-weight:bold;
    }
</style>-->

<div class="header">
    <div class="headerLeft">
        <a href="<%= request.getContextPath()%>/Administration/home">
            <img src="<%= request.getContextPath()%>/css/header.png" alt="header Banner" width="512" height="90" title="Go to Adminitration Homepage"/>
        </a>
    </div>
    <div class="headerRight">
        <div class="firstLine">
            <div 
                id="firstLineLeftNew">
                <s:url namespace="/Administration" action="home" var="adHomeUrl"></s:url>
                <s:a href="%{adHomeUrl}" cssClass="topLine" title="Go to Adminitration Homepage">[Administration Home]</s:a>
            </div>
            <div id="firstLineRight" style="color: white;">
                <% Staff staff3 = (Staff) session.getAttribute("staff");%>
                <%if (session.getAttribute("staff") != null) {%>
                <div id="flr1">
                    <p>Welcome, </p>
                    <s:url namespace="/Administration/Member" action="viewProfile" var="viewProfileUrl"></s:url>
                    <s:a href="%{viewProfileUrl}" cssClass="userProfile" title="View Profile">
                        <b style="font-size: 13.5px;"><% out.print(((Staff) session.getAttribute("staff")).getLoginName());%></b>
                    </s:a>   
                    <%
                        String requestNo;
                        int scart = 0;
                        if (staff3.getRole().equals("Director")) {
                            scart = new RequestDAO().getUnprocessRequestNumber(staff3);
                            if (scart == 0) {
                                requestNo = " 0 Request";
                            } else if (scart == 1) {
                                requestNo = " 1 Request ";
                            } else {
                                requestNo = "" + scart + " Request ";
                            }
                        } else if (staff3.getRole().equals("Store keeper")) {
                            scart = new RequestDAO().getProcessingRequestNumber(staff3);
                            if (scart == 0) {
                                requestNo = " 0 Request";
                            } else if (scart == 1) {
                                requestNo = " 1 Request ";
                            } else {
                                requestNo = "" + scart + " Request ";
                            }
                        } else {
                            requestNo = "";
                        }

                    %>
                    <s:url action="viewRequest" namespace="/Administration/Member" var="viewRequestUrl"></s:url>
                    <a class="topLine" href="<s:property value="#viewRequestUrl"/>" title="Request"><% out.print(requestNo);%></a>
                </div>
                <div id="flr2">

                    <s:url namespace="/Administration" action="logout" var="urlLogout"></s:url>
                    <a class="topLine" href="<s:property value="#urlLogout"/>" title="Logout">[Logout]</a>
                </div>

                <%}%>
            </div>


        </div>
            <div style="background-color:#000;
/*                color:#0F0;*/
         
                font-family:Courier New;
                font-weight:bold;
                font-size: 16px;
                "
                >
                <div id="secondLine2"></div>
            </div>

        </div>
    </div>
</div>
